package com.example.myshortcutdemo

import android.content.Context
import android.graphics.Bitmap
import android.graphics.drawable.Drawable
import com.bumptech.glide.Glide
import java.io.File

/**
 * @author tgw
 * @date 2022/5/9
 * @describe
 */
object DownloadImageUtils {

    fun downloadImage(context: Context,imagePath:String):Drawable{
       return Glide.with(context)
            .load(imagePath)
            .submit(96,96)
            .get()
    }

    fun downloadImageToBitmap(context: Context,imagePath:String?):Bitmap{
        return Glide.with(context)
            .asBitmap().load(imagePath).submit().get()
    }
}